package com.indexingsystem.boss.admin.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.indexingsystem.boss.Vo.AuthRoleVo;
import com.indexingsystem.boss.Vo.OperationsResultVo;
import com.indexingsystem.boss.Vo.OperationsVo;
import com.indexingsystem.boss.Vo.StatusList;
import com.indexingsystem.boss.entity.Operations;

public interface OperationsMapper {
	int deleteOperationsByIdBatch(@Param("list") List<String> list);

	int deleteByPrimaryKey(String operationId);

	int insert(Operations record);

	int insertSelective(Operations record);

	List<Operations> selectOperationsList(String queryCriteria);

	Operations selectByPrimaryKey(String operationId);

	int updateByPrimaryKeySelective(Operations record);

	int updateByPrimaryKey(Operations record);

	/**
	 * 通过查询条件查询是否已存在.
	 * 
	 * @param queryCriteria
	 * @return
	 */
	List<Operations> getOperationsByQueryCriteria(OperationsVo operationsVo);

	/**
	 * 获取总记录数.
	 * 
	 * @return
	 */
	Integer getOperationsCount(String queryCriteria);

	/**
	 * 批量启用，禁用机构.
	 * 
	 * @param institutionMap
	 * @return
	 */
	int batchUpdateOperationsWithList(@Param("list") List<StatusList> list);

	/**
	 * 功能关联操作权限列表.
	 * 
	 * @return
	 */
	List<OperationsResultVo> getOperationsOrFunctioneslist(String queryCriteria);

	/**
	 * 根据用户ID获取权限的Set集合.
	 * 
	 * @param userId
	 * @return
	 */
	List<AuthRoleVo> findPermissionByUserId(String userId);

	/**
	 * 获取操作权限、功能列表/shrio授权使用.
	 * 
	 * @return
	 */
	List<String> queryOperationOrFunctionAll();
}